home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.2 for Intel / NeXTSTEP 3.2 for Intel.iso / NextCD / CDIS / MiniSystem.gnutar.z / MiniSystem.gnutar / private / etc / rc < prev    next >
Encoding:
Text File  |  1993-08-03  |  18.7 KB  |  579 lines

  1. #!/bin/sh -u
  2. #
  3. # This is the multi-user startup script.
  4. #
  5. # Copyright (C) 1992 by NeXT Computer, Inc.  All rights reserved.
  6. #
  7. # Note that all "echo" commands are in parentheses so that
  8. # the main shell does not open a tty and get its process group set.
  9.  
  10. #
  11. # Avoid bailing out on ^C's.  This is needed both for security reasons
  12. # as well as for the "Press Control-C to continue without a network"
  13. # interaction (under ifconfig in rc.net) to function properly.
  14. #
  15. trap "true" 2
  16.  
  17. fbshow -B -E
  18. fbshow -B -I "Initializing system" -z 9
  19.  
  20. #
  21. # Initialize the path to be used and inherited by all the commands herein
  22. #
  23. if [ -f /.path ]; then
  24.     . /.path
  25. else
  26.     PATH=/usr/ucb:/bin:/usr/bin:/etc:/usr/etc; export PATH
  27.     HOME=/; export HOME
  28. fi
  29.  
  30. # Are we booting from a CD-ROM?  If so, switch over to /etc/rc.cdrom.
  31.  
  32. if [ -d /NextCD -a -f /etc/rc.cdrom.`/usr/bin/arch` ]; then
  33.     sh /etc/rc.cdrom.`/usr/bin/arch` $1
  34.     (echo "CD-ROM boot procedure complete.")    >/dev/console
  35.     /etc/halt -e
  36.     exit 0
  37. fi
  38.  
  39. # Start the Mach network message server, which forwards Mach IPC over the
  40. # network and provides a name-to-port mapping service.
  41. # We need to start the nmserver here because any of Config's device drivers
  42. # may need to register themselves with the name server.  Unfortuntely, the
  43. # network isn't ready yet, but that's OK since we tell the nmserver to
  44. # reinitialize its network code later in rc.net.
  45.  
  46. if [ -f /usr/etc/nmserver ]; then
  47.     /usr/etc/nmserver -nonet >/dev/console 2>&1
  48. fi
  49.  
  50. # Configure kern-loaded drivers - Intel only
  51. if [ `/usr/bin/arch` = i386 -a -f /usr/etc/driverLoader ]; then
  52.     (echo "Configuring Device Drivers")         >/dev/console
  53.     fbshow -B -I "Configuring drivers" -z 14
  54.     /usr/etc/driverLoader a >/dev/console 2>&1
  55. fi
  56.  
  57. #
  58. # Configure network & hostname
  59. #
  60. fbshow -B -I "Configuring network" -z 18
  61. sh /etc/rc.net -h >/dev/console
  62.  
  63. #
  64. #  Determine if the network is up by looking for any non-loopback
  65. #  internet network interfaces.
  66. #
  67. if ifconfig -a | grep -v "127.0.0.1" | grep -v "0.0.0.0" | grep -s inet; then
  68.     NETWORKUP=-YES-
  69. else
  70.     NETWORKUP=-NO-
  71. fi
  72.  
  73.  
  74. # Print out an appropriate message.  MESSAGE is used later in the log.
  75.  
  76. if  [ $1x = autobootx ]; then
  77.     # (echo Automatic reboot in progress...)        >/dev/console
  78.     MESSAGE="Reboot"
  79. else
  80.     (echo Multiuser startup in progress...)            >/dev/console
  81.     MESSAGE="Multi-user startup"
  82. fi
  83.  
  84. # Check for and mount swapdisks.
  85. sh /etc/rc.swap $1
  86.  
  87. # Mount local filesystems (according to /etc/fstab).
  88. mount -vat 4.3                        >/dev/console 2>&1
  89.  
  90. # Display a message in the iconic boot window.
  91. fbshow -B -I "Checking system files" -z 23
  92.  
  93. # Attempt to recover the passwd file, if needed.  This procedure is
  94. # primarily historical and makes sense only when the passwd file is edited
  95. # using the vipw command.  
  96.  
  97. if [ -s /etc/ptmp ]; then
  98.     if [ -s /etc/passwd ]; then
  99.         (echo 'Passwd file conflict with ptmp:')    >/dev/console
  100.         ls -l /etc/passwd /etc/ptmp            >/dev/console
  101.         (echo 'Moving ptmp to ptmp.save.')        >/dev/console
  102.         mv -f /etc/ptmp /etc/ptmp.save
  103.     else
  104.         (echo 'Passwd file recovered from ptmp.')     >/dev/console
  105.         mv /etc/ptmp /etc/passwd
  106.     fi
  107. elif [ -r /etc/ptmp ]; then
  108.     (echo 'Removing passwd lock file')            >/dev/console
  109.     /bin/rm -f /etc/ptmp
  110. fi
  111.  
  112. # Start the virtual memory system.
  113. /usr/etc/mach_swapon -av                >/dev/console 2>&1
  114.  
  115. (echo -n 'Cleaning up:')                >/dev/console
  116.  
  117. # If the shutdown command was used to shut the system down, the file
  118. # /etc/nologin may have been created to prevent users from logging in.  
  119. # Remove it so that logins are enabled when the system comes up.
  120.  
  121. /bin/rm -f /etc/nologin
  122. (echo -n ' /etc/nologin')                >/dev/console
  123.  
  124. # Reset pseudo-terminals (ptys) to their default states.
  125. /usr/etc/chown root.tty /dev/tty[pqrs]*
  126. /bin/chmod 666 /dev/tty[pqrs]*
  127. (echo -n ' ptys')                    >/dev/console
  128.  
  129. # Reset permissions and ownership of raw live floppy devices.
  130. # Loginwindow changes these to be owned by the logged in user.
  131. /usr/etc/chown root.operator /dev/rfd[01]b
  132. /bin/chmod 660 /dev/rfd[01]b
  133. (echo -n ' floppy devices')                                   >/dev/console
  134.  
  135. # Recover files being edited by ex, vi, or e when the system was restarted.
  136. (cd /tmp; /usr/lib/ex3.7preserve -a)
  137. (echo -n ' editors')                     >/dev/console
  138.  
  139. # Clean out /tmp.
  140. (cd /tmp; find . ! -name . ! -name lost+found ! -name quotas \
  141.     -exec rm -r - {} \; )
  142. (echo -n ' /tmp')                    >/dev/console
  143.  
  144. # Clear empty subdirectories of /Net.
  145. (cd /private/Net; find . ! -name . -type d -exec rmdir {} \; ) 
  146.  
  147. # Clear symlinks from /Net, too.
  148. (cd /private/Net; find . ! -name . -type l -exec rm {} \; ) 
  149. (echo -n ' /Net')                    >/dev/console
  150.  
  151. (echo '.')                        >/dev/console
  152.  
  153. # Syslog must be started before daemons are launched from rc.local.
  154. # This allows appropriate log messages to find their way to the console.
  155.  
  156. (echo -n Starting early daemons:)                >/dev/console
  157. fbshow -B -I "Starting background services" -z 27
  158. if [ -f /usr/etc/syslogd -a -f /etc/syslog.conf ]; then
  159.     /bin/rm -f /dev/log
  160.     # If you want a timestamp to be logged periodically,
  161.     # modify the invocation of syslogd below.  For example, 
  162.     # for a half-hourly timestamp, add the argument "-m30".
  163.     /usr/etc/syslogd  && (echo -n ' syslogd')        >/dev/console
  164. fi
  165. (echo '.')                            >/dev/console
  166.  
  167. # Read the configuration information set by the HostManager application.
  168. . /etc/hostconfig
  169.  
  170. # Set up NIS domain.
  171.  
  172. if [ "${YPDOMAIN=-NO-}" != "-NO-" -a $NETWORKUP = "-YES-" ]; then
  173.     (echo "Setting NIS domainname to $YPDOMAIN")        >/dev/console
  174.     domainname $YPDOMAIN                >/dev/console 2>&1
  175. fi
  176.  
  177. # Rpc and net services are the minimal set needed to use the network.
  178. (echo -n 'Starting RPC and network services:')            >/dev/console
  179.  
  180. # Start the Mach network message server, which forwards Mach IPC over the
  181. # network and provides a name-to-port mapping service.
  182. #
  183. #if [ -f /usr/etc/nmserver ]; then
  184. #    /usr/etc/nmserver &                >/dev/console 2>&1
  185. #    (echo -n ' nmserver')                    >/dev/console
  186. #fi
  187.  
  188. # portmap converts Sun RPC program numbers into IP port numbers.
  189.  
  190. if [ -f /usr/etc/portmap ]; then
  191.     /usr/etc/portmap && (echo -n ' portmap')         >/dev/console
  192. fi
  193.  
  194. # Turn on IP routing.  If an explicit route is specified (the '*'
  195. # clause), either an IP address must be used or the router's hostname 
  196. # and IP address must be specified in the /etc/hosts file.  
  197. # Set the 'q' (quiet) flag by default to avoid broadcasting routes
  198. # all over the place.  [This should probably be an option.]
  199.  
  200. case ${ROUTER=-NO-} in
  201.     -ROUTED-)
  202.     if [ -f /usr/etc/routed -a $NETWORKUP = "-YES-" ]; then
  203.         /usr/etc/routed -q && (echo -n ' routed')    >/dev/console
  204.     fi
  205.     ;;
  206.     -NO-)
  207.     ;;
  208.     *)
  209.     if [ -f /usr/etc/route ]; then
  210.         /usr/etc/route add default $ROUTER 1    >/dev/console 2>&1
  211.     fi
  212.     ;;
  213. esac
  214.  
  215. # Start up the netinfo daemons.  This will only complete when the
  216. # local domain has bound to its parent domain, if it has a parent
  217. # (that is, if the machine is on a NetInfo network).  The message:
  218. #
  219. #   Still searching for parent network administration (NetInfo) server.
  220. #   Please wait, or press 'c' to continue without network user accounts.
  221. #   See your system administrator if you need help.
  222. #
  223. # comes from the local domain's netinfod; typically, you can wait a minute
  224. # or two and the local domain will eventually find a parent. As the
  225. # message says, the system is still searching for a parent server.
  226. # Typing 'c' aborts that search, which is probably not what you want.  
  227. # (You're most likely to see this message on a network-wide NetInfo server.)
  228. #
  229. # If you would like to customize this message to include the name or
  230. # telephone number of a network administrator, edit the text of the
  231. # message in /usr/lib/NextStep/Resources/English.lproj/NetInfo.strings,
  232. # or its equivalent for your usual boot language.
  233.  
  234. if [ -f /usr/etc/nibindd ]; then
  235.     fbshow -B -I "Starting network services" -z 32
  236.     /usr/etc/nibindd && (echo -n ' netinfo')    >/dev/console 2>&1
  237. fi
  238.  
  239. # If we are in an NIS domain, start up the appropiate services.
  240.  
  241. if [ "$YPDOMAIN" != "-NO-" -a $NETWORKUP = "-YES-" ]; then
  242.     fbshow -B -I "Starting YP services" -z 36
  243.     # ypserv is run on NIS servers - machines with an /etc/yp/XXX dir
  244.     if [ -f /usr/etc/ypserv -a -d /etc/yp/$YPDOMAIN ]; then
  245.         /usr/etc/ypserv && (echo -n ' ypserv')        >/dev/console
  246.     fi
  247.     if [ -f /usr/etc/ypbind ]; then
  248.         /usr/etc/ypbind && (echo -n ' ypbind')        >/dev/console
  249.     fi
  250. fi
  251.  
  252. # The lookup daemon, lookupd, provides information to client programs
  253. # through the standard C library (such as gethostbyname()).  It obtains
  254. # the information from various network services: NetInfo, DNS (also called
  255. # the Domain Name Service - named - and BIND), and NIS.
  256.  
  257. if [ -f /usr/etc/nibindd -a -f /usr/etc/lookupd ]; then
  258.     fbshow -B -I "Starting naming services" -z 41
  259.     /usr/etc/lookupd && (echo -n ' lookupd')        >/dev/console
  260. fi
  261.  
  262. # Start up time service.  If you're doing any sort of network file 
  263. # access, be sure NTP is enabled and properly configured, or you may 
  264. # see very strange errors and file consistency problems.
  265. #
  266. # NeXT's ntpd has been modified to acquire the NTP server
  267. # configuration from NetInfo (the /locations/ntp directory).
  268.  
  269. case ${TIME=-AUTOMATIC-} in
  270.     -AUTOMATIC-)
  271.     if [ -f /usr/etc/ntpd -a $NETWORKUP = "-YES-" ]; then
  272.         # Synchronize our clock to the network's time.
  273.         /usr/etc/ntp -F             >/dev/null
  274.         # Fire off ntpd to keep the clock in sync.
  275.         /usr/etc/ntpd && (echo -n ' ntpd')    >/dev/console
  276.     fi
  277.     ;;
  278.     -NO-)
  279.     ;;
  280.     *)
  281.     ;;
  282. esac
  283.  
  284. # biod is the NFS asynchronous block I/O daemon, which implements
  285. # NFS read-ahead and write-behind caching on NFS clients.
  286.  
  287. if [ -f /usr/etc/biod -a $NETWORKUP = "-YES-" ]; then
  288.     fbshow -B -I "Starting I/O services" -z 45
  289.     /usr/etc/biod 4 && (echo -n ' biod')             >/dev/console
  290. fi
  291.  
  292. (echo '.')                            >/dev/console
  293.  
  294. # Mount remote filesystems.
  295. fbshow -B -I "Mounting file systems" -z 50
  296. (echo 'Mounting remote filesystems')                >/dev/console
  297. mount -at nfs                         >/dev/console 2>&1
  298.  
  299. fbshow -B -I "Starting system services" -z 54
  300.  
  301. # Fileservice daemons are needed to import and export filesystems.
  302. (echo -n 'Starting file service daemons:')            >/dev/console
  303.  
  304. # If AppleTalk (EtherTalk) is desired, start up the AppleTalk daemon.
  305.  
  306. if [ -f /usr/etc/atalkd ]; then
  307.     fbshow -B -I "Starting AppleTalk" -z 59
  308.     if /usr/etc/atalkd >/dev/console 2>&1; then
  309.     (echo -n ' atalkd')                >/dev/console
  310.       fi
  311. fi
  312.  
  313. # Start the automounter only if /Net is a directory that is not
  314. # a symlink (symlinks to directories qualify as directories to test's
  315. # -d operation).
  316.  
  317. if [ -h /Net -o -f /Net ]; then
  318.     (echo "Warning: NeXT NFS automounter did not run.")    >/dev/console
  319. else
  320.     if [ -f /usr/etc/autonfsmount -a $NETWORKUP = "-YES-" ]; then
  321.         # The autonfsmounter will attempt a remount every 10 seconds,
  322.         # cache names for 12 hours [43200 seconds], mount things in
  323.         # /private/Net, ignore any NIS auto.master map, be triggered
  324.         # by references in the /Net directory, and use the fstab
  325.         # map (i.e., look in the mounts database -- /mounts in NetInfo,
  326.         # for example) to locate remote filesystems.
  327.         fbshow -B -I "Starting automounter" -z 63
  328.         /usr/etc/autonfsmount    -tm 10 -tl 43200 \
  329.                     -a /private -m /Net -fstab \
  330.         && (echo -n ' autonfsmount') >/dev/console 2>&1
  331.     fi
  332. fi
  333.  
  334. # If exportfs finds something to export (either using /etc/exports or the
  335. # exports NetInfo directory), then start the NFS daemons (which service
  336. # NFS requests) and the mount server (which services NFS mount requests).
  337.  
  338. if [ -f /usr/etc/exportfs ]; then
  339.     # Clear the table of exported filesystems before running exportfs.
  340.     > /etc/xtab
  341.     fbshow -B -I "Exporting filesystems" -z 68
  342.     if /usr/etc/exportfs -a >/dev/console 2>&1; then
  343.     # There is no "right" number of nfsd's. Infrequently-accessed
  344.     # servers can get by with 4 or fewer.  8 is not excessive for 
  345.     # heavily-loaded servers.
  346.     /usr/etc/nfsd 6 && (echo -n ' nfsd')         >/dev/console
  347.     /usr/etc/rpc.mountd && (echo -n ' rpc.mountd')    >/dev/console 2>&1
  348.     fi
  349. fi
  350.  
  351. # If AppleShare is desired, start up the AppleShare daemon.
  352.  
  353. if [ -f /usr/etc/ashared ]; then
  354.     fbshow -B -I "Starting AppleShare" -z 72
  355.     if /usr/etc/ashared >/dev/console 2>&1; then
  356.     (echo -n ' ashared')                >/dev/console
  357.       fi
  358. fi
  359.  
  360. # If we are a Network Master become a BOOTP and BOOTPARAM server.  This is
  361. # the only thing that depends on the value of NETMASTER from /etc/hostconfig.
  362.  
  363. if [ "${NETMASTER=-NO-}" = "-YES-" ]; then
  364.     # If /etc/bootptab file exists, become a BOOTP server.  Note
  365.     # that bootpd gets information from /etc/bootptab even when
  366.     # NetInfo is running (the per-client information comes from
  367.     # NetInfo; the global information comes from /etc/bootptab).
  368.     if [ -f /usr/etc/bootpd -a -f /etc/bootptab ]; then
  369.         /usr/etc/bootpd && (echo -n ' bootpd')        >/dev/console
  370.     fi
  371.  
  372.     # bootparamd doesn't need a flat file.
  373.     if [ -f /usr/etc/rpc.bootparamd ]; then
  374.         /usr/etc/rpc.bootparamd && \
  375.         (echo -n ' rpc.bootparamd')            >/dev/console
  376.     fi
  377. fi
  378. (echo '.')                            >/dev/console
  379.  
  380. # Network daemons provide service to the outside world.
  381. (echo -n Starting network daemons:)                >/dev/console
  382. fbshow -B -I "Starting network daemons" -z 77
  383.  
  384. # Run the Internet server daemon.
  385. if [ -f /usr/etc/inetd ]; then
  386.     /usr/etc/inetd && (echo -n ' inetd')            >/dev/console
  387. fi
  388.  
  389. # Remove junk from the outbound mail queue directory and start up
  390. # the sendmail daemon. /usr/spool/mqueue is assumed here even though
  391. # it can be changed in the sendmail configuration file.
  392. #
  393. # sendmail is started even if there's no configuration file
  394. # in /etc/sendmail/sendmail.cf.  sendmail can find a configuration file
  395. # based on information in NetInfo (the sendmail.cf property in the 
  396. # /locations/sendmail directory). If no sendmail configuration file 
  397. # exists, sendmail will exit with an appropriate error message.
  398. #
  399. # Any messages which end up in the queue, rather than being delivered
  400. # or forwarded immediately, will be processed once each hour.
  401.  
  402. if [ -f /usr/lib/sendmail ]; then
  403.     (cd /usr/spool/mqueue; rm -f nf* lf*)
  404.     /usr/lib/sendmail -bd -q1h 2>/dev/console && \
  405.         (echo -n ' sendmail')    >/dev/console
  406. fi
  407.  
  408. # lpd is the Berkeley line printer daemon.
  409.  
  410. if [ -f /usr/lib/lpd ]; then
  411.     rm -f /dev/printer
  412.     /usr/lib/lpd && (echo -n ' printer')            >/dev/console
  413. fi
  414.  
  415. # Start an SNMP agent if configured to do so.
  416.  
  417. if [ -f /usr/etc/snmpd ]; then
  418.     if /usr/etc/snmpd -N >/dev/console 2>&1; then
  419.         (echo -n ' snmpd')                >/dev/console
  420.     fi
  421. fi
  422.  
  423. (echo '.')                            >/dev/console
  424.  
  425. # NeXT services support the application environment
  426. (echo -n 'Starting NeXT services:')                >/dev/console
  427. fbshow -B -I "Starting NeXT services" -z 81
  428.  
  429. # The pasteboard server is used by the AppKit.
  430.  
  431. if [ -f /usr/etc/pbs ]; then
  432.     /usr/etc/pbs &&    (echo -n ' pbs')            >/dev/console
  433. fi
  434.  
  435. # exec_faxes starts up any appropriate fax modem daemons.
  436.  
  437. if [ -f /usr/lib/NextPrinter/exec_faxes ]; then
  438.     /usr/lib/NextPrinter/exec_faxes && (echo -n ' exec_faxes')    >/dev/console
  439. fi
  440.  
  441. # If ISDN Networking is desired, start up the PhoneConnector in daemon mode.
  442.  
  443. /usr/bin/niutil -read . /localconfig/ISDN/Networking >/dev/null 2>&1
  444. if [ $? -eq 0 ]; then
  445.     if [ -f /NextAdmin/PhoneConnector.app/PhoneConnector ]; then
  446.         /NextAdmin/PhoneConnector.app/PhoneConnector -Daemon YES && \
  447.             (echo -n ' PhoneConnector')     >/dev/console
  448.     fi
  449. fi
  450.  
  451. (echo '.')                            >/dev/console
  452.  
  453. # Customizations to the startup sequence which load protocol
  454. # stacks such as AppleTalk should be placed in /etc/rc.local.protocols
  455. # This allows them to load before NetWare and get a right of first
  456. # refusal before NetWare on all incoming packets. When used with 802.3
  457. # framing, NetWare consumes all incoming packets and does not 
  458. # pass any on to protocol stacks loaded after NetWare.
  459.  
  460. if [ -f /etc/rc.local.protocols ]; then
  461.     sh /etc/rc.local.protocols $1
  462. fi
  463.  
  464. # If NetWare Networking is desired, start it.
  465.  
  466. ( /usr/bin/niutil -read . /localconfig/NetWare | \
  467.     /usr/bin/egrep 'enable.+YES' ) >/dev/null 2>&1
  468. if [ $? -eq 0 ]; then
  469.  
  470.     #   Don't start NetWare  unless there is at least one network interface up
  471.  
  472.     if [ -n "`ifconfig -a | grep en0 `" -o -n "`ifconfig -a | grep tr0 `" ]; then
  473.         (echo -n "Starting NetWare:")            >/dev/console 2>&1
  474.      fbshow -B -I "Starting NetWare" -z 86
  475.        # Load and start the kernel server.
  476.         if [ -f /usr/lib/kern_loader/nuc/nuc_reloc ]; then
  477.         /usr/etc/kl_util -a /usr/lib/kern_loader/nuc/nuc_reloc \
  478.         >/tmp/nuc_log 2>&1
  479.         (echo -n ' nuc_reloc ')                >/dev/console 2>&1
  480.         fi
  481.         if [ -f /usr/netware/bin/nucinit ]; then
  482.         /usr/netware/bin/nucinit            >/dev/console 2>&1
  483.         (echo -n ' nucinit')                >/dev/console 2>&1
  484.         fi
  485.  
  486.         # Configure the protocol stack.
  487.         if [ -f /usr/netware/etc/npsd ]; then
  488.         /usr/netware/etc/npsd && (echo -n ' npsd')    >/dev/console 2>&1
  489.         fi
  490.  
  491.         # Start the Management Portal, an internal port for communicating
  492.         # with the kernel server.
  493.         if [ -f /usr/netware/bin/nwmp ]; then
  494.         /usr/netware/bin/nwmp start && (echo -n ' nwmp') >/dev/console 2>&1
  495.         fi
  496.  
  497.         # Start the Netware Service Advertisement Protocol Daemon, which looks for
  498.         # NetWare servers' advertisement packets.
  499.         if [ -f /usr/netware/etc/sapd ]; then
  500.         /usr/netware/etc/sapd && (echo -n ' sapd')    >/dev/console 2>&1
  501.         fi
  502.  
  503.         # Start the NetWare automounter.
  504.         if [ -f /usr/etc/autoNetWaremount ]; then
  505.         /usr/etc/autoNetWaremount && (echo -n ' autoNetWaremount') \
  506.         >/dev/console 2>&1
  507.         fi
  508.     else
  509.         (echo -n 'No network interface: NetWare not started')    >/dev/console 2>&1
  510.     fi
  511.  
  512.     (echo '.')                            >/dev/console
  513. fi
  514.  
  515.  
  516. # InputManager startup procedure (Japanese)
  517.  
  518. if [ -d /NextLibrary/InputManager ]; then
  519.     (echo -n 'Starting input servers:')                >/dev/console
  520.     fbshow -B -I "Starting input servers" -z 90
  521.     for i in /NextLibrary/InputManager/*
  522.     do
  523.         if [ -d $i ]; then
  524.             if [ $i = "/NextLibrary/InputManager/Resources" ]; then
  525.                 continue
  526.             fi
  527.             rcfile=`basename $i`
  528.             if [ -f $i/${rcfile}.rc ]; then
  529.                 sh $i/${rcfile}.rc $1
  530.             fi
  531.         fi
  532.     done
  533.     (echo '.')                            >/dev/console
  534. fi
  535.  
  536. # Any customizations to the startup sequence you would like to make should
  537. # be placed in /etc/rc.local; this way they can be preserved when your 
  538. # system is later upgraded to a new version of system software.
  539.  
  540. if [ -f /etc/rc.local ]; then
  541.     sh /etc/rc.local $1
  542. fi
  543.  
  544. # Unlock tip lines.  tip and UUCP share lock files so they don't get in
  545. # each other's way.
  546.  
  547. if [ -d /usr/spool/uucp ]; then
  548.     rm -f /usr/spool/uucp/LCK.*
  549.     rm -f /usr/spool/uucp/LCK/LCK.*
  550. fi
  551.  
  552. # Start standaard daemons that should always run
  553. (echo -n Starting standard daemons:)                >/dev/console
  554. fbshow -B -I "Starting standard daemons" -z 95
  555.  
  556. # update flushes the cached blocks from the filesystem using
  557. # the sync system call every 30 seconds.  This ensures the
  558. # disk is reasonably up-to-date in the event of a system crash.
  559.  
  560. update && (echo -n ' update')                    >/dev/console
  561.  
  562. # cron executes commands listed in /etc/crontab at specified times.
  563.  
  564. cron && (echo -n ' cron')                    >/dev/console
  565.  
  566. # accton is here for historical reasons.
  567.  
  568. # if [ -f /usr/adm/acct ]; then
  569. #    accton /usr/adm/acct && (echo -n ' accounting')        >/dev/console
  570. # fi
  571.  
  572. (echo '.')                            >/dev/console
  573.  
  574. # Submit a syslog note to indicate that we've successfully rebooted.
  575. /usr/ucb/logger -t reboot -p kern.crit "$MESSAGE complete"
  576. fbshow -B -I "Startup complete" -z 100
  577.  
  578. exit 0
  579.